#include "task_test.h"

#include "task_manager.h"
#include "gui_object.h"
#include "gui_entry.h"

void run_task(void *gui_console)
{
    struct gui_console *gs_console = (struct gui_console *)gui_console;
        switch(gs_console->current_input_type)
        {
        case BUTTON_NONE:
            gs_console->current_object_duration++;
            if(gs_console->current_object_duration == 10)
            {
                gui_entry_get(gs_console);
                //show_name(gs_console);
            }
            return;
            break;
        case BUTTON_MENU:
            gui_object_go_back_to_parent(gs_console);

            break;

        case BUTTON_UP:
            gui_object_go_peer_next(gs_console);

            break;

        case BUTTON_DOWN:
            gui_object_go_peer_priv(gs_console);

            break;

        case BUTTON_OK:
            gui_object_into_child(gs_console);

            break;
        }
       gs_console->current_object_duration = 0;
       gs_console->current_input_type = BUTTON_NONE;
}


